SELECT $fieldName; separator=", "$ FROM ( SELECT $fieldName; separator=", "$ FROM $tableName$ WHERE createDate BETWEEN :beginDate AND :endDate AND createDate = lastUpdateDate UNION ALL SELECT $fieldName; separator=", "$ FROM $tableName$ WHERE lastUpdateDate BETWEEN :rBeginDate AND :rEndDate AND createDate != lastUpdateDate LIMIT :limit OFFSET :offset) ChangeFeed ORDER BY createDate, lastUpdateDate